function selectAll(field, checked) {
	var ids = field;
	  if (ids.length)  {
		  for (var i = 0;i < ids.length;i++) {
	        ids[i].checked = checked;
	      }
	  }
}